package entity;

import enums.RelationState;

import java.io.Serializable;
import java.time.LocalDateTime;

public class Relation implements Serializable {

    private static final long serialVersionUID = 2545291845325501256L;

    private String hostUsername;
    private String guestUsername;
    private RelationState state;
    private LocalDateTime timestamp;

    public Relation(String hostUsername, String guestUsername, RelationState state, LocalDateTime timestamp) {
        this.hostUsername = hostUsername;
        this.guestUsername = guestUsername;
        this.state = state;
        this.timestamp = timestamp;
    }

    public Relation(Relation other) {
        this.hostUsername = other.hostUsername;
        this.guestUsername = other.guestUsername;
        this.state = other.state;
        this.timestamp = other.timestamp;
    }

    public String getHostUsername() {
        return hostUsername;
    }

    public String getGuestUsername() {
        return guestUsername;
    }

    public RelationState getState() {
        return state;
    }

    public LocalDateTime getTimestamp() {
        return timestamp;
    }

    public void setState(RelationState state) {
        this.state = state;
    }

    public void setTimestamp(LocalDateTime timestamp) {
        this.timestamp = timestamp;
    }
}
